package android.video.online.ui.user.order;

import android.os.Message;
import android.support.v7.widget.RecyclerView;
import android.video.online.R;
import android.video.online.core.BasicPresenter;
import android.video.online.ui.BasicActivity;
import android.video.online.widget.LoadingView;

/**
 * Created by Jay on 2017/8/6.
 */

public class ShoppingCarActivity extends BasicActivity implements ShoppingCarContract.View {
    private RecyclerView mLvClazz;
    private LoadingView mLoadingView;

    private ShoppingCarContract.Presenter presenter;

    @Override
    public int setLayoutId() {
        return R.layout.activity_shopping_car;
    }

    @Override
    public void init() {
        initView();
        initData();
    }

    private void initData() {
        presenter = new ShoppingCarPresenter(this);
        presenter.loadAllOrder(mLoadingView);
    }

    private void initView() {
        mLvClazz = (RecyclerView) findViewById(R.id.lv_clazz_list);
        mLoadingView = (LoadingView) findViewById(R.id.ld_loading);

    }

    @Override
    public void handlerMessage(Message msg) {

    }

    @Override
    public BasicPresenter getPresenter() {
        return presenter;
    }
}
